{template /common/header} 

<div class="app_body">
  <div class="app_jfzdShiJian"> 时间：
    <input type="text" id="start" name="start" readonly="readonly" class="input_2"  value="<?php echo date('Y-m-d',$start!=""?$start:time());?>"   nullmsg="请输入选择日期！"/>
    至
    <input type="text" id="end" name="end" readonly="readonly" class="input_2"  value="<?php echo date('Y-m-d',$end!=""?$end:time());?>"    nullmsg="请输入选择日期！"/>
  </div>
  <div class="app_jfzdDingDan"> 订单状态：
    <select id="status" class="search_select" style="height:35px;border-radius:5px; border-color:#CCCCCC">
      <option value="" {if $status==""} selected="selected"{/if}>--未选择--</option>
      <option value="0"  {if $status=="0"} selected="selected"{/if}>--未完成--</option>
      <option value="1" {if $status=="1"} selected="selected"{/if} >--已完成--</option>
    </select>
  </div>
  <input type="button" value="查询" class="btnLan" style="margin:0 auto" />
</div>
<div class="app_jfzdJiLu">
  <table>
    <tr>
      <th>商家电话</th>
      <th>商家名称</th>
      <th>兑换积分</th>
      <th>兑换时间</th>
      <th>状态</th>
    </tr>
    <?php foreach ($list["list"] as $k => $v): ?>
    <tr>
      <td><div align="center">{get_user_mobile($v[touid])}</div></td>
      <td><div align="center"><a href="tel:{get_user_mobile($v[touid])}">{get_user_mobile($v[touid])}</a></div></td>
      <td><div align="center">{get_user_compay($v[touid])}</div></td>
      <td><div align="center">{$v[money]}元</div></td>
      <td><div align="center">{date('Y-m-d',$v[dateline])}</div></td>
      <td><div align="center">{if $v[status]==0}<span class="red">未处理</span>{else}已处理{/if}</div></td>
    </tr>
    <?php endforeach ?>
  </table>
</div>
<div class="pagefooter pageactivity">
  <div class="pagefooter-01 fr"> {$pages}</div>
</div>
<?php echo jsfile('hddate');?> 
<script>
var start = {
    elem: '#start',
    format: 'YYYY-MM-DD',
    max: laydate.now(),
    istime: true,
    istoday: false,
    choose: function(datas){
         end.min = datas; //开始日选好后，重置结束日的最小日期
         end.start = datas //将结束日的初始值设定为开始日
    }
};
var end = {
    elem: '#end',
    format: 'YYYY-MM-DD',
    max: laydate.now(),
    istime: true,
    istoday: false,
    choose: function(datas){
        start.max = datas; //结束日选好后，重置开始日的最大日期
    }
};
laydate(start); 
laydate(end);
$(".btnLan").click(function(){
	window.location.href="{U('Order/orderdownscore')}&status="+$("#status").val()+"&start="+$("#start").val()+"&end="+$("#end").val();
	//$("#search_form").submit();	
})

</script> 
{template /common/footer}